package se.liu.johfa428.levelstate;

/**
 * This is a level state. It is contained within LevelSelectionPlatform
 * and is passed down to a ObjectGoal when a new world is created.
 * 
 * @author johfa428
 */
public class LevelState {

	// The state
	private State state;
	
	// A enumerated type for the state {START, NORMAL, CLEAR}
	public enum State {
		START(1), 
		NORMAL(2),
		CLEAR(3);
		
		private int index;
		
		private State(int index) {
			this.index = index;
		}
		
		public int getIndex() {
			return index;
		}
	};
	
	/** The constructor of the LevelState */
	public LevelState(State state) {
		setState(state);
	}
	
	/** Returns the state of the LevelState */
	public State getState() {
		return state;
	}
	
	public int getIndex() {
		return state.getIndex();
	}
	
	/** Sets the state in the LevelState */
	public void setState(State state) {
		this.state = state;
	}
	
}
